package com.ghn.cocknovel.ui.activity.setting.vm

import android.app.Application
import androidx.lifecycle.MutableLiveData
import com.example.basemodel.base.BaseViewModel
import com.ghn.cocknovel.net.DataService
import com.ghn.cocknovel.viewmodel.BookStoreViewModel
import com.kt.NetworkModel.bean.ChangePasswordBean
import com.kt.NetworkModel.bean.OnlineBean
import com.kt.NetworkModel.net.CallBack
import com.kt.NetworkModel.net.RxUtils

/**
 * @author 浩楠
 *
 * @date 2023/10/11-16:58.
 *
 *      _              _           _     _   ____  _             _ _
 *     / \   _ __   __| |_ __ ___ (_) __| | / ___|| |_ _   _  __| (_) ___
 *    / _ \ | '_ \ / _` | '__/ _ \| |/ _` | \___ \| __| | | |/ _` | |/ _ \
 *   / ___ \| | | | (_| | | | (_) | | (_| |  ___) | |_| |_| | (_| | | (_) |
 *  /_/   \_\_| |_|\__,_|_|  \___/|_|\__,_| |____/ \__|\__,_|\__,_|_|\___/
 * @Description: TODO
 */
open class ChangePassWordViewModel (application: Application) : BaseViewModel(application) {
    companion object {
        val TAG: String? = BookStoreViewModel::class.simpleName
    }
    val changepassword=MutableLiveData<ChangePasswordBean?>()
    /**
     *  在线时常
     */
    open fun getchangepassword(password:String) {
        DataService.getchangepassword(password).compose(RxUtils.mainSync())
            .subscribe(object : CallBack<ChangePasswordBean>() {
                override fun onResult(result: ChangePasswordBean?) {
                    changepassword.value = result
                }
            })
    }
}